<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
    <script src="js/wxrem.js" type="text/javascript" charset="utf-8"></script>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script src="js/art-template.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/md5.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        document.writeln("<script type=\"text/javascript\" src=\"js/common.js?"+ Math.random() + "\"></scr"+"ipt>");
    </script>

</head>
<style>
    .home_box{
        padding-bottom: 4rem;
    }
    .center_box{
        -webkit-flex: 1;
        flex: 1;
    }
    .footer_box{
        width: 70%;
        height: 5rem;
        border-radius: 2.5rem;
        background: #ffd74b;
        font-size: 1.7rem;
        font-weight: bold;
        color: #222222;
        line-height: 5rem;
        text-align: center;
        position: fixed;
        bottom: 3rem;
        left: 50%;
        margin-left: -35%;
    }
</style>
<body>
<div class="flex-vertical home_box" >
    <div class="flex-con center_box">
        <img src="img/publicity1.png" alt="">
        <img src="img/publicity2.png" alt="">
        <img src="img/publicity3.png" alt="">
        <img src="img/publicity4.png" alt="">
    </div>
    <div class="footer_box">
        立即开馆
    </div>

</div>
<script>

    $('.footer_box').click(function () {
        location.href= shareUrl
    })
    $.ajax({
        url: hostUrl + "merchant/jssgin?url=" + encodeURIComponent(window.location.href),
        dataType: "json",
        sync:false,
        success: function (data) {
            var att = data.data;
            console.info(att);
            wx.config({
                //debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                appId: att.appId, // 必填，公众号的唯一标识
                timestamp: att.timestamp, // 必填，生成签名的时间戳
                nonceStr: att.nonceStr, // 必填，生成签名的随机串
                signature: att.signature,// 必填，签名
                jsApiList: ['onMenuShareAppMessage'] // 必填，需要使用的JS接口列表
            });
        }
    });
    //分享给好友
    wx.ready(function () {
    wx.onMenuShareAppMessage({
        title: '我在蜜读开了一个知识听书馆，邀请你一起加入！',
        desc: '以书会友，听书变现，海量好书无限畅听。', // 分享描述
        link: relink,
        imgUrl: shareUrl + "img/fx_home.jpg",// 自定义图标
        type: 'link', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () {

        },
        cancel: function () {
            // 用户取消分享后执行的回调函数
        }
    });
    });

  // shareWx("蜜读移动听书馆——招募馆长", shareUrl + "img/fx_home.jpg", "有声书、小课、精品课，涵盖26大领域，任你挑选，还有免费听书可以领哦~");

</script>

</body>
</html>